<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>印制电路板订单标签</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Microsoft YaHei', 'SimSun', 'SimHei', sans-serif;
    }

    body {
      background: #ffffff;
      padding: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }

    .container {
      max-width: 300px;
      width: 100%;
      text-align: center;
    }

    .label-card {
      background: white;
      border: 2px solid #000;
      border-radius: 4px;
      overflow: hidden;
      max-width: 250px;
      margin: 0 auto;
      position: relative;
      page-break-inside: avoid;
    }

    .label-header {
      background: #2c3e50;
      color: white;
      padding: 8px;
      text-align: center;
      position: relative;
    }

    .label-header h2 {
      font-size: 14px;
      letter-spacing: 1px;
      font-weight: bold;
      margin: 0;
    }

    .label-content {
      padding: 10px 12px;
    }

    .info-row {
      display: table;
      width: 100%;
      padding: 4px 0;
      border-bottom: 1px solid #e0e0e0;
      table-layout: fixed;
    }

    .info-row:last-child {
      border-bottom: none;
    }

    .info-label {
      display: table-cell;
      font-weight: bold;
      color: #333;
      font-size: 10px;
      text-align: left;
      width: 35%;
      vertical-align: middle;
    }

    .info-value {
      display: table-cell;
      font-weight: normal;
      color: #000;
      font-size: 10px;
      text-align: left;
      width: 65%;
      vertical-align: middle;
      padding-left: 5px;
    }

    .highlight {
      color: #e63946;
      font-weight: bold;
    }

    .corner-decoration {
      position: absolute;
      width: 8px;
      height: 8px;
    }

    .corner-tl {
      top: 4px;
      left: 4px;
      border-top: 1px solid #adb5bd;
      border-left: 1px solid #adb5bd;
    }

    .corner-tr {
      top: 4px;
      right: 4px;
      border-top: 1px solid #adb5bd;
      border-right: 1px solid #adb5bd;
    }

    .corner-bl {
      bottom: 4px;
      left: 4px;
      border-bottom: 1px solid #adb5bd;
      border-left: 1px solid #adb5bd;
    }

    .corner-br {
      bottom: 4px;
      right: 4px;
      border-bottom: 1px solid #adb5bd;
      border-right: 1px solid #adb5bd;
    }

    /* PDF优化样式 */
    @page {
      size: A4 portrait;
      margin: 20mm;
    }

    @media print {
      body {
        background: white;
        padding: 0;
      }
      
      .container {
        max-width: none;
        width: 100%;
      }
      
      .label-card {
        max-width: none;
        border: 2px solid #000;
        box-shadow: none;
      }
    }
  </style>
</head>
<body>
<div class="container">
  <div class="label-card">
    <div class="label-header">
      <h2>印制电路板</h2>
      <div class="corner-decoration corner-tl"></div>
      <div class="corner-decoration corner-tr"></div>
      <div class="corner-decoration corner-bl"></div>
      <div class="corner-decoration corner-br"></div>
    </div>

    <div class="label-content">
      <div class="info-row">
        <div class="info-label">订单编号：</div>
        <div class="info-value">${订单编号}</div>
      </div>

      <div class="info-row">
        <div class="info-label">物料编码：</div>
        <div class="info-value">${物料编码}</div>
      </div>

      <div class="info-row">
        <div class="info-label">客户型号：</div>
        <div class="info-value">${客户型号}</div>
      </div>

      <div class="info-row">
        <div class="info-label">生产编码：</div>
        <div class="info-value">${生产编码}</div>
      </div>

      <div class="info-row">
        <div class="info-label">数量：</div>
        <div class="info-value highlight">${数量} pcs</div>
      </div>

      <div class="info-row">
        <div class="info-label">生产日期：</div>
        <div class="info-value">${生产日期}</div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
